{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Preparing Alpha Factors and Features to predict Stock Returns"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Imports & Settings"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:53:33.508385Z",
     "start_time": "2020-06-19T23:53:33.506026Z"
    }
   },
   "outputs": [],
   "source": [
    "import warnings\n",
    "warnings.filterwarnings('ignore')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:53:33.968355Z",
     "start_time": "2020-06-19T23:53:33.510143Z"
    }
   },
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "import talib\n",
    "from talib import RSI, BBANDS, MACD, ATR"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:53:33.971290Z",
     "start_time": "2020-06-19T23:53:33.969435Z"
    }
   },
   "outputs": [],
   "source": [
    "MONTH = 21\n",
    "YEAR = 12 * MONTH"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:53:33.987810Z",
     "start_time": "2020-06-19T23:53:33.972463Z"
    }
   },
   "outputs": [],
   "source": [
    "START = '2010-01-01'\n",
    "END = '2017-12-31'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:53:33.998338Z",
     "start_time": "2020-06-19T23:53:33.991832Z"
    }
   },
   "outputs": [],
   "source": [
    "sns.set_style('darkgrid')\n",
    "idx = pd.IndexSlice"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:53:34.008711Z",
     "start_time": "2020-06-19T23:53:34.002005Z"
    }
   },
   "outputs": [],
   "source": [
    "percentiles = [.001, .01, .02, .03, .04, .05]\n",
    "percentiles += [1-p for p in percentiles[::-1]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:53:34.018715Z",
     "start_time": "2020-06-19T23:53:34.011125Z"
    }
   },
   "outputs": [],
   "source": [
    "T = [1, 5, 10, 21, 42, 63]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Loading Quandl Wiki Stock Prices & Meta Data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:53:37.728424Z",
     "start_time": "2020-06-19T23:53:34.021080Z"
    }
   },
   "outputs": [],
   "source": [
    "DATA_STORE = '../data/assets.h5'\n",
    "ohlcv = ['adj_open', 'adj_close', 'adj_low', 'adj_high', 'adj_volume']\n",
    "with pd.HDFStore(DATA_STORE) as store:\n",
    "    prices = (store['quandl/wiki/prices']\n",
    "              .loc[idx[START:END, :], ohlcv]\n",
    "              .rename(columns=lambda x: x.replace('adj_', ''))\n",
    "              .swaplevel()\n",
    "              .sort_index())\n",
    "    metadata = (store['us_equities/stocks'].loc[:, ['marketcap', 'sector']])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:53:37.763381Z",
     "start_time": "2020-06-19T23:53:37.729411Z"
    }
   },
   "outputs": [],
   "source": [
    "prices.volume /= 1e3\n",
    "prices.index.names = ['symbol', 'date']\n",
    "metadata.index.name = 'symbol'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Remove stocks with insufficient observations"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:54:30.270909Z",
     "start_time": "2020-06-19T23:53:37.764472Z"
    }
   },
   "outputs": [],
   "source": [
    "min_obs = 7 * YEAR\n",
    "nobs = prices.groupby(level='symbol').size()\n",
    "keep = nobs[nobs > min_obs].index\n",
    "prices = prices.loc[idx[keep, :], :]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Align price and meta data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:54:30.280818Z",
     "start_time": "2020-06-19T23:54:30.271836Z"
    }
   },
   "outputs": [],
   "source": [
    "metadata = metadata[~metadata.index.duplicated() & metadata.sector.notnull()]\n",
    "metadata.sector = metadata.sector.str.lower().str.replace(' ', '_')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:55:06.551172Z",
     "start_time": "2020-06-19T23:54:30.281795Z"
    }
   },
   "outputs": [],
   "source": [
    "shared = (prices.index.get_level_values('symbol').unique()\n",
    "          .intersection(metadata.index))\n",
    "metadata = metadata.loc[shared, :]\n",
    "prices = prices.loc[idx[shared, :], :]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Limit universe to 1,000 stocks with highest market cap"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:55:17.253761Z",
     "start_time": "2020-06-19T23:55:06.552815Z"
    }
   },
   "outputs": [],
   "source": [
    "universe = metadata.marketcap.nlargest(1000).index\n",
    "prices = prices.loc[idx[universe, :], :]\n",
    "metadata = metadata.loc[universe]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:55:17.261899Z",
     "start_time": "2020-06-19T23:55:17.254921Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "consumer_services        187\n",
       "finance                  168\n",
       "technology               116\n",
       "health_care              103\n",
       "capital_goods             94\n",
       "basic_industries          67\n",
       "public_utilities          66\n",
       "consumer_non-durables     61\n",
       "energy                    51\n",
       "consumer_durables         36\n",
       "miscellaneous             28\n",
       "transportation            23\n",
       "Name: sector, dtype: int64"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "metadata.sector.value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:55:17.321209Z",
     "start_time": "2020-06-19T23:55:17.263046Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "MultiIndex: 2004775 entries, ('A', Timestamp('2010-01-04 00:00:00')) to ('ZION', Timestamp('2017-12-29 00:00:00'))\n",
      "Data columns (total 5 columns):\n",
      " #   Column  Non-Null Count    Dtype  \n",
      "---  ------  --------------    -----  \n",
      " 0   open    2004775 non-null  float64\n",
      " 1   close   2004775 non-null  float64\n",
      " 2   low     2004775 non-null  float64\n",
      " 3   high    2004775 non-null  float64\n",
      " 4   volume  2004775 non-null  float64\n",
      "dtypes: float64(5)\n",
      "memory usage: 84.3+ MB\n"
     ]
    }
   ],
   "source": [
    "prices.info(null_counts=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:55:17.326097Z",
     "start_time": "2020-06-19T23:55:17.322086Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "Index: 1000 entries, AAPL to NTCT\n",
      "Data columns (total 2 columns):\n",
      " #   Column     Non-Null Count  Dtype  \n",
      "---  ------     --------------  -----  \n",
      " 0   marketcap  1000 non-null   float64\n",
      " 1   sector     1000 non-null   object \n",
      "dtypes: float64(1), object(1)\n",
      "memory usage: 23.4+ KB\n"
     ]
    }
   ],
   "source": [
    "metadata.info()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Compute Rolling Average Dollar Volume"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:55:18.220654Z",
     "start_time": "2020-06-19T23:55:17.327352Z"
    }
   },
   "outputs": [],
   "source": [
    "# compute dollar volume to determine universe\n",
    "prices['dollar_vol'] = prices.loc[:, 'close'].mul(prices.loc[:, 'volume'], axis=0).div(1e3)\n",
    "prices['dollar_vol'] = (prices\n",
    "                        .groupby('symbol',\n",
    "                                 group_keys=False,\n",
    "                                 as_index=False)\n",
    "                        .dollar_vol\n",
    "                        .rolling(window=21)\n",
    "                        .mean()\n",
    "                        .fillna(0)\n",
    "                        .reset_index(level=0, drop=True))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:55:18.658810Z",
     "start_time": "2020-06-19T23:55:18.221606Z"
    }
   },
   "outputs": [],
   "source": [
    "prices['dollar_vol_rank'] = (prices\n",
    "                             .groupby('date')\n",
    "                             .dollar_vol\n",
    "                             .rank(ascending=False))\n",
    "prices = prices.drop('dollar_vol', axis=1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Add some Basic Factors"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Compute the Relative Strength Index"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:55:19.357377Z",
     "start_time": "2020-06-19T23:55:18.659767Z"
    }
   },
   "outputs": [],
   "source": [
    "prices['rsi'] = prices.groupby(level='symbol').close.apply(RSI)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:55:20.147252Z",
     "start_time": "2020-06-19T23:55:19.358265Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAagAAAEYCAYAAAAJeGK1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAgAElEQVR4nOzdeWBU1dn48e8sWWeybywhLGHfN7FCg5ISwQVQogbQaJH2bW2tpRUFXJACJZTq+6pU0Z/VqqAlal1AEVk1bKJBIwQIS4CwZl8n26y/P1IGIwmThJncm+T5/EPmnnvPee7lTJ7c7RyNw+FwIIQQQqiMVukAhBBCiIZIghJCCKFKkqCEEEKokiQoIYQQqiQJSgghhCpJghJCCKFKkqAE/fr1Y8qUKUybNo077riDSZMmkZiYyMGDB53rfPjhh0yfPp2pU6dy22238eSTT1JRUQHAuXPnGDFiRIN1JycnEx8fz7Rp05g2bRq33XYbK1euxGQyAXDw4EEeeeSRq8Z34MABFi1a1GDZj7dfsGABr7/+erP3/8EHH6S4uBiAX//615w4caLZdbTUtGnTKC8vp6Kigvvvv9+5vF+/fs6YriY/P5+5c+cyZcoUpkyZwt13383WrVuvqN/dVq1axZIlS+otO3HihPP/+aabbmLUqFHOz2+++WaD27jL1frg1cTHx9fr55ds2rSJ5ORkd4QmroFe6QCEOrz11luEhoY6P7/++ussW7aM1NRUDhw4wEsvvcR//vMfgoODsdls/OUvf2Hx4sU899xzLut+/PHHmTx5MgAWi4Vly5Yxb948XnnlFYYMGcKLL7541e1PnDhBXl5eg2VN2d6V3bt3O39+7bXXrqmu5vrkk0+Aul+wDf2idOWpp55i7NixPP/880DdsZo5cyY9e/YkNjbWWX9r6N27t7O9Dz/8kC+++IJXX33VWb5q1apWi0W0D3IGJa5gtVq5ePEiQUFBABQUFOBwOKipqQFAp9Pxxz/+kbvvvrvZdXt5ebFw4UK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N44ePQpAbW0t48aN46OPPmL+/Pn8/e9/B2D16tXk5+fzySef8Mknn2C321m5cmW9uLZu3crmzZv5+OOPWbduXYMJTLQ+SVACqPsFvWHDBl599VVqamq4/vrrCQsLA+rOep577jl27NjB7NmzsVgszJ8/nz/96U8tbk+j0eDn51dv2S233MKSJUt49NFHOXToEH/+858b3LZz58507dq1wbJp06bh7++Pt7c3U6dOZc+ePS2Kb+fOndx6663Oy57Tp08nLy+Pc+fOARAXF4e3tzdeXl707duXsrKyK+pISEggLS2Nffv28bOf/YywsDCOHz/Otm3buPnmm13GcOnMcMCAAZjN5gZ/ad5www18+eWXvPTSSwwbNowdO3YwefJkDhw4UG+9r776imnTpuHj44O3tzdJSUn1yidMmIBWq8VoNNK9e3fKysro2rUrK1euZMOGDTz77LOsW7fuijPF5ho3bpzzmPbv37/eWe3o0aMBqKqq4ttvv+WFF15g2rRp3HPPPVy8eJGsrCz69u2LTqfj7rvv5vnnn2fSpEmMHDkSqOunl/646t+/P0VFRQCkpaUxY8YMvLy80Gq1JCcns3Pnznpx7d27l4SEBIxGI3q9nsTExGvaT+EekqBEPYMGDWLhwoUsWLDA+cv4gw8+YNu2bURFRTF16lSWLl3KRx99xKZNm5p0I/+nqquryc7Opnfv3vWWz5gxg/Xr1zNu3Dh27drF1KlTqa2tvWJ7f3//Ruu+dPYB4HA40OuvvM1qNptdxnjpEtePORwO5yVDX19f53KNRkNDQ1pOnDiRr776it27dzNu3DjGjh3Lrl27SEtLY+LEiS5juBS7RqNxtv9jRUVFLF68GI1Gw+jRo/ntb3/LO++8w6233srHH3/cYF2XaLX1v/oN7c+hQ4dISkrCZDIxbtw4fvWrX7mMuan79ON2Lrn0/2q323E4HKxbt8551pOamspvfvMbAgMD+eSTT5g/fz46nY65c+c6L396eXnVq/sSu91+xeeGzkZ/HMuP+5FQjiQocYXbb7+doUOHOi9/abVann32WXJzc53rHD9+nC5dujjvUzVVTU0Ny5cvZ/z48URHR9crmzFjBkeOHGH69OksXbqU8vJ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9OR7iI9JYeHg4pqenYTAYMDExgenpaXg8Hq3LItIcv0ERaSwhIQGhoaGwWCywWCxwOp0oLi7WuiwizXFAEWnMYDDg5uYGR0dHmJychMvlQmZmJkpKSrQujUhTHFBEOhAdHY3b21uUlpYiODgYNTU1yl0ChujfeBYfERHpEk+SICIiXeKAIiIiXeKAIiIiXeKAIiIiXeKAIiIiXeKAIiIiXeKAIiIiXfoL8wIgtJJta6UAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "ax = sns.distplot(prices.rsi.dropna())\n",
    "ax.axvline(30, ls='--', lw=1, c='k')\n",
    "ax.axvline(70, ls='--', lw=1, c='k')\n",
    "ax.set_title('RSI Distribution with Signal Threshold')\n",
    "sns.despine()\n",
    "plt.tight_layout();"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Compute Bollinger Bands"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:55:20.150316Z",
     "start_time": "2020-06-19T23:55:20.148136Z"
    }
   },
   "outputs": [],
   "source": [
    "def compute_bb(close):\n",
    "    high, mid, low = BBANDS(close, timeperiod=20)\n",
    "    return pd.DataFrame({'bb_high': high, 'bb_low': low}, index=close.index)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:55:21.501185Z",
     "start_time": "2020-06-19T23:55:20.151236Z"
    }
   },
   "outputs": [],
   "source": [
    "prices = (prices.join(prices\n",
    "                      .groupby(level='symbol')\n",
    "                      .close\n",
    "                      .apply(compute_bb)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:55:21.544427Z",
     "start_time": "2020-06-19T23:55:21.502044Z"
    }
   },
   "outputs": [],
   "source": [
    "prices['bb_high'] = prices.bb_high.sub(prices.close).div(prices.bb_high).apply(np.log1p)\n",
    "prices['bb_low'] = prices.close.sub(prices.bb_low).div(prices.close).apply(np.log1p)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:55:22.212231Z",
     "start_time": "2020-06-19T23:55:21.545314Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAABDAAAAFgCAYAAABNIolGAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAgAElEQVR4nOzde5CkdZ3n+8+TT96zLlldXdVXGptGLu2oo1xmnBFd3HFRIzh7wmEC7NkOGedsnPGwoxgcxFFEIzyG62o4Oj2haO86nm1BZdCzwhmHdRcZLoqIgH206UZoEOhb9a2ybnl7buePrMzugrpkZj2ZT+bzvF8RRFhpVuX3IemH5FPf7/dneJ7nCQAAAAAAoIfFgi4AAAAAAABgJQQYAAAAAACg5xFgAAAAAACAnkeAAQAAAAAAeh4BBgAAAAAA6HkEGAAAAAAAoOcRYAAAgK7bu3evdu7cKUk6deqUPvjBD+rP//zPdd111+mll14KuDoAANCL4t14kWrV1tRUqRsvtayBgZRmZytBl4EV8D71B96n/sD71B/6/X0aGxts6fm7d+/WPffco0wmI0n6whe+oKuvvlrvec979POf/1zPP/+8tmzZsuzP6JXPFivp9/e2FVG5Vq4zfKJyrVG5Tik61xrm61zqs0VXOjAMw+jGy6woHjeDLgFN4H3qD7xP/YH3qT9E7X3asmWLdu3a1fj6ySef1MTEhK6//nrde++9uvzyy1f8Gb3y2WIlUXpvo3KtXGf4ROVao3KdUnSuNSrXebaudGAAAADUXXXVVTp06FDj68OHD2toaEjf+ta39Pd///favXu3Pvzh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Y926dcjNzYWmacjKysIHH3yAPn36YMuWLc2un56ejj//+c8YN24cdu/e7ZteVlaG9957Dx999BHWr18Pu93um6fT6fCnP/0Ja9aswcaNG9usbETUfpjAIKI7utfBBgC89dZbGDNmDD788EP84Q9/wNKlSzFmzBgcPnwYAHDkyBHcuHEDqqpi//79mDRpUlsXi4iIiNrZiBEjIEkSYmNjERERAVmWMXz4cABAWloaLly40Oz6Q4cOBQDExcU1OIFy+fJlJCUlwWQyQVEUpKam+ualpKRAkiTEx8e36KQLEXV8TGAQ0R3d62ADAAoLCzFq1CgAQI8ePWCxWGCz2dC/f38UFBRAp9Nh+PDhOHz4MK5fv46kpKQ2LRMRERG1vxMnTgAAiouLYbPZIITA6dOnAXhPZiQnJwe03YSEBPzzn/+Ew+GApmkoKCjwzZMk6d4DJ6IOhffAIKI7utNgY8iQIS0ebCQlJeHIkSNISUnBzZs3UVVVhejoaEycOBGrVq3ChAkT0K9fP6xevRpjxoxp6yIRERFREDgcDmRnZ8NmsyE3Nxc5OTnYtGkTLl26hN69e2Px4sUBbTcmJgZPPfUUZs+ejejoaDidTuh0Oqiq2solIKKOQBJCiGAHQUQdz7Zt27Br1y643W7YbDYsXrwYOTk5GDFihG+wsWLFCuj1+ibXnzdvHnJychAbG4uXXnoJlZWVcDgcePbZZzFu3DhUV1dj9OjR2L59O3r27IkHH3wQW7ZsQUpKSjuXlIiIiEKVqqp49913fffTmjNnDp577jnftz+JqHNhAoOIiIiIiILq2rVrWLJkSaPpo0aNwi9/+ctm13399ddx4MAB6PV6DBs2DEuXLuXlI0SdFBMYRBSwexlsEBERERER3Q0mMIiIiIiIiIiow+OvkBARERERERFRh8cEBhERERERERF1eExgEBEREREREVGHxwQGEREREREREXV4TGAQERERERERUYf3/8xkMdM1427gAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 1080x360 with 2 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig, axes = plt.subplots(ncols=2, figsize=(15, 5))\n",
    "sns.distplot(prices.loc[prices.dollar_vol_rank<100, 'bb_low'].dropna(), ax=axes[0])\n",
    "sns.distplot(prices.loc[prices.dollar_vol_rank<100, 'bb_high'].dropna(), ax=axes[1])\n",
    "sns.despine()\n",
    "plt.tight_layout();"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Compute Average True Range"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:55:22.989155Z",
     "start_time": "2020-06-19T23:55:22.213161Z"
    }
   },
   "outputs": [],
   "source": [
    "prices['NATR'] = prices.groupby(level='symbol', \n",
    "                                group_keys=False).apply(lambda x: \n",
    "                                                        talib.NATR(x.high, x.low, x.close))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:55:22.992306Z",
     "start_time": "2020-06-19T23:55:22.990019Z"
    }
   },
   "outputs": [],
   "source": [
    "def compute_atr(stock_data):\n",
    "    df = ATR(stock_data.high, stock_data.low, \n",
    "             stock_data.close, timeperiod=14)\n",
    "    return df.sub(df.mean()).div(df.std())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:55:24.233346Z",
     "start_time": "2020-06-19T23:55:22.993235Z"
    }
   },
   "outputs": [],
   "source": [
    "prices['ATR'] = (prices.groupby('symbol', group_keys=False)\n",
    "                 .apply(compute_atr))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Compute Moving Average Convergence/Divergence"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:55:24.956498Z",
     "start_time": "2020-06-19T23:55:24.234232Z"
    }
   },
   "outputs": [],
   "source": [
    "prices['PPO'] = prices.groupby(level='symbol').close.apply(talib.PPO)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:55:24.959596Z",
     "start_time": "2020-06-19T23:55:24.957424Z"
    }
   },
   "outputs": [],
   "source": [
    "def compute_macd(close):\n",
    "    macd = MACD(close)[0]\n",
    "    return (macd - np.mean(macd))/np.std(macd)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:55:26.214881Z",
     "start_time": "2020-06-19T23:55:24.960708Z"
    }
   },
   "outputs": [],
   "source": [
    "prices['MACD'] = (prices\n",
    "                  .groupby('symbol', group_keys=False)\n",
    "                  .close\n",
    "                  .apply(compute_macd))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Combine Price and Meta Data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:55:26.269940Z",
     "start_time": "2020-06-19T23:55:26.215809Z"
    }
   },
   "outputs": [],
   "source": [
    "metadata.sector = pd.factorize(metadata.sector)[0].astype(int)\n",
    "prices = prices.join(metadata[['sector']])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Compute Returns"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Historical Returns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:55:26.748222Z",
     "start_time": "2020-06-19T23:55:26.270784Z"
    }
   },
   "outputs": [],
   "source": [
    "by_sym = prices.groupby(level='symbol').close\n",
    "for t in T:\n",
    "    prices[f'r{t:02}'] = by_sym.pct_change(t)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Daily historical return quantiles"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:55:51.852433Z",
     "start_time": "2020-06-19T23:55:26.749171Z"
    }
   },
   "outputs": [],
   "source": [
    "for t in T:\n",
    "    prices[f'r{t:02}dec'] = (prices[f'r{t:02}'].groupby(level='date')\n",
    "             .apply(lambda x: pd.qcut(x, q=10, labels=False, duplicates='drop')))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Daily sector return quantiles"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:57:51.523015Z",
     "start_time": "2020-06-19T23:55:51.853449Z"
    },
    "scrolled": false
   },
   "outputs": [],
   "source": [
    "for t in T:\n",
    "    prices[f'r{t:02}q_sector'] = (prices.groupby(\n",
    "        ['date', 'sector'])[f'r{t:02}'].transform(\n",
    "            lambda x: pd.qcut(x, q=5, labels=False, duplicates='drop')))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Compute Forward Returns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:57:52.298280Z",
     "start_time": "2020-06-19T23:57:51.523875Z"
    }
   },
   "outputs": [],
   "source": [
    "for t in [1, 5, 21]:\n",
    "    prices[f'r{t:02}_fwd'] = prices.groupby(level='symbol')[f'r{t:02}'].shift(-t)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Remove outliers"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:57:52.861428Z",
     "start_time": "2020-06-19T23:57:52.299200Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>r01</th>\n",
       "      <th>r05</th>\n",
       "      <th>r10</th>\n",
       "      <th>r21</th>\n",
       "      <th>r42</th>\n",
       "      <th>r63</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>2.003775e+06</td>\n",
       "      <td>1.999775e+06</td>\n",
       "      <td>1.994775e+06</td>\n",
       "      <td>1.983775e+06</td>\n",
       "      <td>1.962775e+06</td>\n",
       "      <td>1.941775e+06</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>7.519751e-04</td>\n",
       "      <td>3.726962e-03</td>\n",
       "      <td>7.353932e-03</td>\n",
       "      <td>1.555927e-02</td>\n",
       "      <td>3.113691e-02</td>\n",
       "      <td>4.619119e-02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>2.166262e-02</td>\n",
       "      <td>4.791746e-02</td>\n",
       "      <td>6.579895e-02</td>\n",
       "      <td>9.467552e-02</td>\n",
       "      <td>1.325751e-01</td>\n",
       "      <td>1.618423e-01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>-8.757416e-01</td>\n",
       "      <td>-8.768476e-01</td>\n",
       "      <td>-8.778415e-01</td>\n",
       "      <td>-8.802285e-01</td>\n",
       "      <td>-8.867366e-01</td>\n",
       "      <td>-8.863481e-01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>-8.088407e-03</td>\n",
       "      <td>-1.721664e-02</td>\n",
       "      <td>-2.291896e-02</td>\n",
       "      <td>-3.045918e-02</td>\n",
       "      <td>-3.531712e-02</td>\n",
       "      <td>-3.696833e-02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>6.561680e-04</td>\n",
       "      <td>3.702235e-03</td>\n",
       "      <td>7.173181e-03</td>\n",
       "      <td>1.503253e-02</td>\n",
       "      <td>2.899023e-02</td>\n",
       "      <td>4.217809e-02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>9.509191e-03</td>\n",
       "      <td>2.440601e-02</td>\n",
       "      <td>3.707177e-02</td>\n",
       "      <td>5.927618e-02</td>\n",
       "      <td>9.305628e-02</td>\n",
       "      <td>1.219666e-01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>1.216425e+01</td>\n",
       "      <td>1.252657e+01</td>\n",
       "      <td>1.252657e+01</td>\n",
       "      <td>1.252657e+01</td>\n",
       "      <td>1.181643e+01</td>\n",
       "      <td>1.166968e+01</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                r01           r05           r10           r21           r42  \\\n",
       "count  2.003775e+06  1.999775e+06  1.994775e+06  1.983775e+06  1.962775e+06   \n",
       "mean   7.519751e-04  3.726962e-03  7.353932e-03  1.555927e-02  3.113691e-02   \n",
       "std    2.166262e-02  4.791746e-02  6.579895e-02  9.467552e-02  1.325751e-01   \n",
       "min   -8.757416e-01 -8.768476e-01 -8.778415e-01 -8.802285e-01 -8.867366e-01   \n",
       "25%   -8.088407e-03 -1.721664e-02 -2.291896e-02 -3.045918e-02 -3.531712e-02   \n",
       "50%    6.561680e-04  3.702235e-03  7.173181e-03  1.503253e-02  2.899023e-02   \n",
       "75%    9.509191e-03  2.440601e-02  3.707177e-02  5.927618e-02  9.305628e-02   \n",
       "max    1.216425e+01  1.252657e+01  1.252657e+01  1.252657e+01  1.181643e+01   \n",
       "\n",
       "                r63  \n",
       "count  1.941775e+06  \n",
       "mean   4.619119e-02  \n",
       "std    1.618423e-01  \n",
       "min   -8.863481e-01  \n",
       "25%   -3.696833e-02  \n",
       "50%    4.217809e-02  \n",
       "75%    1.219666e-01  \n",
       "max    1.166968e+01  "
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "prices[[f'r{t:02}' for t in T]].describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:57:52.868952Z",
     "start_time": "2020-06-19T23:57:52.864279Z"
    }
   },
   "outputs": [],
   "source": [
    "outliers = prices[prices.r01>1].index.get_level_values('symbol').unique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:57:59.365760Z",
     "start_time": "2020-06-19T23:57:52.870028Z"
    }
   },
   "outputs": [],
   "source": [
    "prices = prices.drop(outliers, level='symbol')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Create time and sector dummy variables"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:57:59.726663Z",
     "start_time": "2020-06-19T23:57:59.366967Z"
    }
   },
   "outputs": [],
   "source": [
    "prices['year'] = prices.index.get_level_values('date').year\n",
    "prices['month'] = prices.index.get_level_values('date').month\n",
    "prices['weekday'] = prices.index.get_level_values('date').weekday"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Store Model Data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:57:59.884344Z",
     "start_time": "2020-06-19T23:57:59.727505Z"
    },
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "MultiIndex: 1994931 entries, ('A', Timestamp('2010-01-04 00:00:00')) to ('ZION', Timestamp('2017-12-29 00:00:00'))\n",
      "Data columns (total 38 columns):\n",
      " #   Column           Non-Null Count    Dtype  \n",
      "---  ------           --------------    -----  \n",
      " 0   open             1994931 non-null  float64\n",
      " 1   close            1994931 non-null  float64\n",
      " 2   low              1994931 non-null  float64\n",
      " 3   high             1994931 non-null  float64\n",
      " 4   volume           1994931 non-null  float64\n",
      " 5   dollar_vol_rank  1994931 non-null  float64\n",
      " 6   rsi              1981001 non-null  float64\n",
      " 7   bb_high          1976026 non-null  float64\n",
      " 8   bb_low           1976022 non-null  float64\n",
      " 9   NATR             1981001 non-null  float64\n",
      " 10  ATR              1981001 non-null  float64\n",
      " 11  PPO              1970056 non-null  float64\n",
      " 12  MACD             1962096 non-null  float64\n",
      " 13  sector           1994931 non-null  int64  \n",
      " 14  r01              1993936 non-null  float64\n",
      " 15  r05              1989956 non-null  float64\n",
      " 16  r10              1984981 non-null  float64\n",
      " 17  r21              1974036 non-null  float64\n",
      " 18  r42              1953141 non-null  float64\n",
      " 19  r63              1932246 non-null  float64\n",
      " 20  r01dec           1993933 non-null  float64\n",
      " 21  r05dec           1989956 non-null  float64\n",
      " 22  r10dec           1984981 non-null  float64\n",
      " 23  r21dec           1974036 non-null  float64\n",
      " 24  r42dec           1953141 non-null  float64\n",
      " 25  r63dec           1932246 non-null  float64\n",
      " 26  r01q_sector      1993933 non-null  float64\n",
      " 27  r05q_sector      1989956 non-null  float64\n",
      " 28  r10q_sector      1984981 non-null  float64\n",
      " 29  r21q_sector      1974036 non-null  float64\n",
      " 30  r42q_sector      1953141 non-null  float64\n",
      " 31  r63q_sector      1932246 non-null  float64\n",
      " 32  r01_fwd          1993936 non-null  float64\n",
      " 33  r05_fwd          1989956 non-null  float64\n",
      " 34  r21_fwd          1974036 non-null  float64\n",
      " 35  year             1994931 non-null  int64  \n",
      " 36  month            1994931 non-null  int64  \n",
      " 37  weekday          1994931 non-null  int64  \n",
      "dtypes: float64(34), int64(4)\n",
      "memory usage: 586.1+ MB\n"
     ]
    }
   ],
   "source": [
    "prices.info(null_counts=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T23:58:00.258966Z",
     "start_time": "2020-06-19T23:57:59.885847Z"
    }
   },
   "outputs": [],
   "source": [
    "prices.drop(['open', 'close', 'low', 'high', 'volume'], axis=1).to_hdf('data.h5', 'model_data')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.7"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": true,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
